import reHtml from './index.html'
import './index.css'
export default {
    template:reHtml,
    data(){
        return {
            name:'',
            user:'',
            pwd:'',
            msgShow:false,
            msg:''
        }
    },
    methods:{
        registerSubmit(){
            const {name,user,pwd} = this
            if(Object.is(name,'')){
                this.msg = '用户名不能为空'
                this.msgShow = true
                return
            }
            if(Object.is(user,'')){
                this.msg = '账号不能为空'
                this.msgShow = true
                return
            }
            if(Object.is(pwd,'')){
                this.msg = '密码不能为空'
                this.msgShow = true
                return
            }
            alert('注册成功',name,user,pwd)
        },
        closeMsg(){
            this.msgShow = false
        }

    }
}